<?php
require_once realpath(dirname(__FILE__) . '//..//..//..//pages.php');
require_once MDL_REQ_FORM;

function classe () {
    $form = formClasse ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=classe');
    return $form;
}

function distretto () {
    $form = formDistretto ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=distretto');
    return $form;
}

function docente () {
    $form = formDocente ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=docente');
    return $form;
}

function indirizzo () {
    $form = formIndirizzo ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=indirizzo');
    return $form;
}

function intervento () {
    $form = formIntervento ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=intervento');
    return $form;
}

function materia () {
    $form = formMateria ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=materia');
    return $form;
}

function ospedale () {
    $form = formOspedale ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=ospedale');
    return $form;
}

function permesso () {
    $form = formPermesso ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=permesso');
    return $form;
}

function reparto () {
    $form = formReparto();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=reparto');
    return $form;
}

function ricovero () {
    $form = formRicovero();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=ricovero');
    
    $tag = $form->getTagByName('data');
    $tag[0]->addAttribute ('value', 'Sar&agrave; utilizzata la data attuale');
    
    return $form;
}

function scuola () {
    $form = formScuola();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=scuola');
    return $form;
}

function studente () {
    $form = formStudente ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=studente');
    return $form;
}

function supervisiona () {
    $form = formSupervisiona();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=supervisiona');
    return $form;
}

function tipoIntervento () {
    $form = formTipoIntervento ();
    $form->addAttribute ('action', HTTP_CTRL_MAIN . '?request=insert&table=tipo_intervento');
    return $form;
}

function tipoRicovero () {
    $form = formTipoRicovero();
    $form->addAttribute('action', HTTP_CTRL_MAIN . '?request=insert&table=tipo_ricovero');
    return $form;
}

function user () {
    $form = formUser();
    $form->addAttribute('action', HTTP_CTRL_MAIN . '?request=insert&table=user');

    return $form;
}

?>
